package com.game.Maze;

import com.badlogic.gdx.InputAdapter;
import com.badlogic.gdx.InputProcessor;

public class GameInput extends InputAdapter implements InputProcessor
{
  private IGameEvents m_Events = null;
  
  private boolean hasEventsDispatcher()
  {
    return (null != m_Events);
  }
  
  public GameInput(IGameEvents events)
  {
    super();
    m_Events = events;
  }

  @Override
  public boolean touchUp(int x, int y, int pointer, int button)
  {
    if (!hasEventsDispatcher())
      return false;
    
    m_Events.createNewGame();
    return true;
  }
}
